package today.rocky.elegantcoding.annotation;

import today.rocky.elegantcoding.common.IdentityCardNumberValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * @author Rocky
 * @version 1.0
 * @date 2020/5/19 12:51
 */
@Documented
@Target({ElementType.PARAMETER, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = IdentityCardNumberValidator.class)
public @interface IdentityCardNumber {

	String message() default "身份证号码不合法";

	Class<?>[] groups() default {};

	Class<? extends Payload>[] payload() default {};
}
